package com.onstar.cn.api;

import com.onstar.cn.api.framework.ClazzInjectUtils;
import com.onstar.cn.api.framework.annotation.Path;
import com.onstar.cn.api.framework.annotation.RequestMapping;
import com.onstar.cn.framework.network.entity.RequestEntity;

@Path("/user")
public class TokenService {

	private String serverURL;
	/** 
	* @Description: TODO
	* @author 6335yz
	* @date 2015年8月20日 下午3:36:47 
	*/
	public TokenService(String serverURL) {
		this.serverURL = serverURL;
	}


	@RequestMapping("/authorization/create")
	public RequestEntity create(RequestEntity entity) {
		if (entity == null) {
			entity = new RequestEntity();
		}
		String url = ClazzInjectUtils.injectUrl(getClass(), "create", entity);
		entity.setUrl(serverURL + url);
		return entity;
	}

	
}
